﻿using System;
using System.CodeDom;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp3
{
    class Program
    {
        static void Main(string[] args)
        {
            var conString = "server=.;database=student;uid=sa;pwd=123456";

            var sqlCon = new SqlConnection(conString);

            var insertString = string.Format("insert into student(Name,Age)values('{0}','{1}')", "小陈", "15");

            SqlCommand cmd = new SqlCommand(insertString, sqlCon);

            sqlCon.Open();

            sqlCon.Close();
        }
    }
}
